<?php
class Course extends DataMapper {
	// --------------------------------------------------------------------
	// Relationships
	//   Configure your relationships below
	// --------------------------------------------------------------------

	// Insert related models that Template can have just one of.
	var $has_one = array(
            'category' => array('join_table' => 'courses_categories')
        );

	// Insert related models that Template can have more than one of.
	var $has_many = array(
            'user' => array('join_table' => 'users_courses'),
            'classroom' => array('join_table' => 'courses_classrooms'),
            'article' => array('join_table' => 'courses_articles'),
            'attachment' => array('join_table' => 'courses_attachments')
        );
        
        
        
        var $validation = array(
            array(
                'field' => 'title',
                'label' => 'Title',
                'rules' => array('required', 'trim', 'unique')
            )

        
        );

            function __construct($id = NULL)
            {
                parent::__construct($id);
            }


}

/* End of file user.php */
/* Location: ./application/models/user.php */
